package com.zyb.educms.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zyb.commonutils.R;
import com.zyb.educms.entity.CrmBanner;
import com.zyb.educms.service.CrmBannerService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 前台使用接口
 * </p>
 *
 * @author testJava
 * @since 2022-04-08
 */
@RestController
@RequestMapping("/educms/consumer-banner")
//@CrossOrigin
public class BannerConsumerController {

    @Resource
    private CrmBannerService bannerService;

    @GetMapping("selectAllBanner")
    public R selectAllBanner(){
        List<CrmBanner> allBanner = bannerService.getAllBanner();
        return R.ok().data("allBanner",allBanner);
    }
}

